//#include <stdio.h>
//#include <stdlib.h>
//#include <limits.h>
//
//int compare(const void* a, const void* b) 
//{
//    return (*(int*)a - *(int*)b);
//}
//
//int main()
//{
//    int N, M;
//    scanf_s("%d %d", &N, &M);
//    int* A = (int*)malloc(N * sizeof(int));
//    for (int i = 0; i < N; i++) 
//    {
//        scanf_s("%d", &A[i]);
//    }
//
//    qsort(A, N, sizeof(int), compare);
//
//    long long min_val = LLONG_MAX;
//    for (int i = 0; i <= N - M; i++) 
//    {
//        long long diff = (long long)A[i + M - 1] * A[i + M - 1] - (long long)A[i] * A[i];
//        if (diff < min_val)
//        {
//            min_val = diff;
//        }
//    }
//
//    printf("%lld\n", min_val);
//    free(A);
//    return 0;
//}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef long long ll;

int main()
{
    int n;
    ll k;
    scanf_s("%d %lld", &n, &k);
    char* s = (char*)malloc((n + 2) * sizeof(char));
    scanf_s("%s", s + 1);

    int* pre0 = (int*)malloc((n + 1) * sizeof(int));
    int* pre1 = (int*)malloc((n + 1) * sizeof(int));
    ll* G = (ll*)malloc((n + 1) * sizeof(ll));

    pre0[0] = 0;
    pre1[0] = 0;
    G[0] = 0;

    for (int i = 1; i <= n; i++) 
    {
        pre0[i] = pre0[i - 1] + (s[i] == '0');
        pre1[i] = pre1[i - 1] + (s[i] == '1');
        if (s[i] == '0')
        {
            G[i] = G[i - 1] + pre1[i];
        }
        else
        {
            G[i] = G[i - 1];
        }
    }

    ll total = (ll)pre0[n] * pre1[n] - G[n];
    if (k > total) 
    {
        printf("-1\n");
        free(s);
        free(pre0);
        free(pre1);
        free(G);
        return 0;
    }

    for (int l = 1; l <= n; l++)
    {
        int low = l, high = n;
        while (low <= high) 
        {
            int mid = (low + high) / 2;
            ll a = pre0[mid] - pre0[l - 1];
            ll b = pre1[mid];
            ll S = G[mid] - G[l - 1];
            ll cnt = a * b - S;
            if (cnt < k) 
            {
                low = mid + 1;
            }
            else if (cnt > k)
            {
                high = mid - 1;
            }
            else
            {
                printf("%d %d\n", l, mid);
                free(s);
                free(pre0);
                free(pre1);
                free(G);
                return 0;
            }
        }
    }

    printf("-1\n");
    free(s);
    free(pre0);
    free(pre1);
    free(G);
    return 0;
}